<!-- 消防隐患-详情 -->
<template>
	<view class="page">
		<cu-custom bgColor="bg-white" :isBack="true">
			<block style="color: ##777777;font-size: 32rpx;" slot="content">隐患详情</block>
		</cu-custom>
		<view class="content">
			<ul>
				<li v-if="dangerForm.abnormalPic">
					<text class="list-info">隐患图片：</text>
					<image :src="dangerForm.abnormalPic"></image>
				</li>
				<li>
					<text class="list-info">隐患名称：</text>
					<text class="list-title">{{dangerForm.name || '暂无'}}</text>
				</li>
				<li>
					<text class="list-info">执行时间：</text>
					<text class="list-title">{{dangerForm.executeTime | dateFormat}} </text>
				</li>
				<li>
					<text class="list-info">隐患描述：</text>
					<text class="list-title">{{dangerForm.remark || '暂无'}} </text>
				</li>
				<li>
					<text class="list-info">所属企业：</text>
					<text class="list-title">{{dangerForm.enterpriseName || '暂无'}} </text>
				</li>
				<li>
					<text class="list-info">所属区域：</text>
					<text class="list-title">{{dangerForm.regionName || '暂无'}} </text>
				</li>
				<li>
					<text class="list-info">隐患地点：</text>
					<text class="list-title">{{dangerForm.address || '暂无'}} </text>
				</li>
				<li v-if="dangerForm.reportPersonName">
					<text class="list-info">上报人：</text>
					<text class="list-title">{{dangerForm.reportPersonName || '暂无'}} </text>
				</li>
				<li v-if="dangerForm.reportPersonTel">
					<text class="list-info">上报人电话：</text>
					<text class="list-title">{{dangerForm.reportPersonTel || '暂无'}} </text>
				</li>
				<li v-if="dangerForm.reportTime">
					<text class="list-info">上报时间：</text>
					<text class="list-title">{{dangerForm.reportTime | dateFormat}} </text>
				</li>
				<li>
					<text class="list-info">当前状态：</text>
					<text class="list-title">{{dangerForm.statusStr || '暂无'}} </text>
				</li>
				<li>
					<text class="list-info">整改期限：</text>
					<text class="list-title">{{dangerForm.deadline | dateFormat}} </text>
				</li>
				<li v-if="dangerForm.status === 12">
					<text class="list-info">申请整改时间：</text>
					<text class="list-title">{{dangerForm.examineTime | dateFormat}} </text>
				</li>
				<li v-if="dangerForm.status === 4">
					<text class="list-info">完成时间：</text>
					<text class="list-title">{{dangerForm.completeTime | dateFormat}} </text>
				</li>
				<li v-if="dangerForm.status === 4">
					<text class="list-info">完成图片：</text>
					<image :src="dangerForm.completeUrl"></image>
				</li>
				<li v-if="dangerForm.status === 6">
					<text class="list-info">误报图片：</text>
					<image :src="dangerForm.misreportUrl"></image>
				</li>
				<li v-if="dangerForm.status === 6">
					<text class="list-info">误报描述：</text>
					<text class="list-title">{{dangerForm.misreportDesc || '暂无'}} </text>
				</li>
			</ul>
		</view>
		<message />
	</view>
</template>

<script>
	import * as constants from '@/common/config.js';
	export default {
		data() {
			return {
				dangerForm: {},
				ucId: ''
			}
		},
		onLoad(option) {
			this.ucId = option.ucId
			this.xq()
		},
		methods: {
			xq() {
				let that = this
				// 请求数据
				let app = getApp()
				app.globalData.request({
					url: 'wx/inHiddenDanger/getInHiddenDanger',
					data: {
						"ucId": that.ucId
					}
				}).then(function(res) {
					that.dangerForm = res.data.data
				}).catch(function(e) {

				})
			}
		}
	}
</script>

<style scoped>
</style>